<template>
  <van-cell @click="show = true" />
  <van-popup v-model:show="show" position="bottom" :style="{ height: '90%' }" closeable>
    <div class="water-tracker">
      <h6>每日步骤</h6>
      <div class="content">
        <h3>
          今天你喝了 <span class="highlight"><br />750ml</span> 毫升水
        </h3>
        <div class="progress-container">
          <van-progress :percentage="75" color="#00bfff" text-color="#fff" :stroke-width="100" />
        </div>
      </div>
    </div>
    <div class="llll">
      <img src="../../public/image copy 4.png" alt="" />
    </div>

    <div class="tip">
      <p>真棒！</p>
      <p>继续坚持——每顿饭前先喝水可以防止你吃得太多</p>
    </div>
  </van-popup>
</template>

<script setup>
import { ref } from 'vue'
const show = ref(false)
// eslint-disable-next-line no-unused-vars
const percentage = ref(75)
function yuh() {
  show.value = ref(true)
}
yuh()
</script>

<style scoped lang="css">
.water-tracker {
  width: 90%;
  text-align: center;
}

h3 {
  font-size: 24px;
  margin: 10px 0;
}

.highlight {
  color: #ff69b4;
}

.progress-container {
  width: 20px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 20px auto;
}
.tip {
  width: 290px;
  border: 1px solid #333;
  height: 80px;
  border-radius: 20px;
  text-align: left;
  background-color: rgb(109, 93, 210);
  margin: 0 auto;
  color: white;
  line-height: 25px;
  padding: 6px;
}
.van-progress {
  transform: rotate(-90deg); /* 旋转组件以实现竖直效果 */
}
* {
  padding: 0;
  margin: 0;
}
.llll {
  width: 290px;
  text-align: right;
  margin-bottom: -26px;
  margin-left: 26px;
}
.llll > img {
  width: 60px;
}
</style>
